package com.wisdytech.linkdcs.equipment.service;

import com.github.pagehelper.PageInfo;
import com.wisdytech.common.bean.Filter;
import com.wisdytech.common.bean.StandardResult;
import com.wisdytech.linkdcs.equipment.model.AlarmRecord;
import com.wisdytech.linkdcs.equipment.model.EquipAlarmParam;
import com.wisdytech.linkdcs.system.model.SysUser;

import java.util.List;

/**
 * 
 * <p>ClassName: IEquipmentAlarmService</p>
 * <p>Description: 设备预警定义类</p>
 * <p>Author: dailibo</p>
 * <p>Date: 2017-11-2</p>
 */
public interface IEquipmentAlarmService {
    
    /**
     * 
     * <p>Description: 分页获取预警定义</p>
     * @param filter 分页参数
     * @param eqCode 设备id
     * @param eqName 设备名称
     * @return
     */
    PageInfo<EquipAlarmParam> listDefinitions(Filter filter,String eqCode,String eqName);
    
    /**
     * 
     * <p>Description: 增加预警定义</p>
     * @return
     */
    StandardResult add(EquipAlarmParam param);
    
    /**
     * 
     * <p>Description: 更新预警定义</p>
     * @return
     */
    StandardResult update(EquipAlarmParam param);
    
    /**
     * 
     * <p>Description: 更新预警记录</p>
     * @return
     */
    StandardResult update(AlarmRecord record);
    
    /**
     * 
     * <p>Description: 批量更新预警定义</p>
     * @param params 预警定义列表
     * @return 是否更新成功
     */
    StandardResult update(List<EquipAlarmParam> params);
    
    /**
     * 
     * <p>Description: 批量更新预警定义</p>
     * @param params 预警定义列表
     * @return 是否更新成功
     */
    StandardResult delete(List<EquipAlarmParam> params);
    
    
    /**
     * 
     * <p>Description: 获取告警记录</p>
     * @param filter 
     * @param eqCode
     * @param startTime
     * @param endTime
     * @return
     */
    PageInfo<AlarmRecord> listAlarmRecord(
            Filter filter ,String eqCode,String startTime,String endTime);


    void dealAlarmRecord(AlarmRecord record,SysUser operator);
}
